<template>
  <div class="bos">
    <h2>子组件</h2>
    <button @click="add">count:{{ $store.state.count }}</button>
  </div>
</template>

<script>
export default {
  methods: {
    add () {
      this.$store.state.count += 2
    }
  }
}
</script>

<style>
.bos {
  width: 500px;
  height: 500px;
  background-color: pink;
}
</style>
